<?php $this->render("Admin.Header");?>
<div id="wrapper">
	<div id="leftcol">
    <?php $this->render("Admin.Menu");?>
	</div>
	<div id="rightcol">
		<div id="main">
            <?php $this->render("Admin.Location");?>
			<div>
                <span><?php echo isset($error_message) ? $error_message : NULL;?></span>
            </div>

            <div>
                <span><a href="<?php echo NICED_URL::buildURL("Admin.Acl.Role.Create")?>">新增</a></span>
            </div>

			<div class="container-block">
				<table class="list">
					<caption>数据</caption>
					<tbody>
						<tr>
							<th>名称</th><th>操作</th>
						</tr>
				        <?php
                        if ($roles)
                        {
                            foreach ($roles as $k => $v)
                            {
                        ?>
                                <tr>
                                    <td><?php echo $v["name"]?></td>
                                    <td>
                                        <a href="<?php echo NICED_URL::buildURL("Admin.Acl.Role.Delete", array($v["id"]))?>">删除</a>&nbsp;&nbsp;
                                        <a href="<?php echo NICED_URL::buildURL("Admin.Acl.Role.Update", array($v["id"]))?>">编辑</a>
                                    </td>
                                </tr>
                        <?php
                            }
                        }
                        else
                        {
                        ?>
                            <tr>
                                <td colspan="2">没有记录</td>
                            </tr>
                        <?php
                        }
                        ?>
					</tbody>
				</table>
		    </div>
	    </div>
	</div>
</div>
<?php $this->render("Admin.Footer");?>
